package com.harmontronics.hanma.paas.paas.domain.hmureport.service;

import com.bstek.ureport.definition.datasource.BuildinDatasource;
import java.sql.Connection;
import java.sql.DriverManager;
import lombok.Data;

@Data
public class UreportDataSource implements BuildinDatasource {

    private String name = "myDataSource";

    private String url;

    private String password;

    private String username;

    private String driver;


    @Override
    public String name(){
        return name;
    }


    @Override
    public Connection getConnection(){

        try{
            Connection conn= DriverManager.getConnection(url, username, password);
            return conn;
        }catch(Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
